

#import "ZGL24ClsDetailCell.h"
@interface ZGL24ClsDetailCell()
@property(nonatomic, retain)UILabel *ptime;
@end
@implementation ZGL24ClsDetailCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {        
        [self.source removeFromSuperview];
        [self.line removeFromSuperview];
        
        _ptime = [[UILabel alloc]init];
        _ptime.textColor = [UIColor lightGrayColor];
        _ptime.textAlignment = NSTextAlignmentRight;
        _ptime.font = [UIFont systemFontOfSize:10];
        [self.background addSubview:_ptime];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.background.frame = CGRectMake(12*ScaleX, 12*ScaleX, 350*ScaleX, 95*ScaleX);
    self.img.frame = CGRectMake(15*ScaleX, 10*ScaleX, 85*ScaleX, 70*ScaleX);
    self.title.frame = CGRectMake(110*ScaleX, 10*ScaleX, 225*ScaleX, 45*ScaleX);
    self.ptime.frame = CGRectMake(110*ScaleX, 55*ScaleX, 225*ScaleX, 15*ScaleX);
}

- (void)setMod:(ZGL24ClsDetailModel *)mod{
    _mod = mod;
    self.height = 110;
    [self.img sd_setImageWithURL:mod.imgsrc placeholderImage:[UIImage imageNamed:@"squirrel"]];
    self.title.text = mod.title;
    _ptime.text = mod.ptime;
}

@end
